/**
 * 
 */
package info.niwota.ziplock;

import java.util.List;

import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;

/**
 * @author qiangli
 *
 */
public final class License {
	public static boolean isEZBoardingAvailable(Context ctx) {
		final PackageManager pm = ctx.getPackageManager();
		final Intent i = createEZBoardingIntent();
		List<ResolveInfo> l = pm.queryIntentActivities(i,
				PackageManager.MATCH_DEFAULT_ONLY);
		return (l.size() > 0);
	}
	
	public static Intent createEZBoardingIntent() {
		final Intent i = new Intent(Intent.ACTION_GET_CONTENT);
		i.setClassName("info.niwota.ezb", "info.niwota.ezb.ImageHolderActivity");
		return i;
	}
}
